<?php echo $header; ?>
<?php echo $sidebar; ?>		

<div class="span10 content">

    <?php echo $hugemenu; ?>

    <?php if ($this->router->method == 'create'): ?>
        <h3><?php echo lang('agent:title:create_agent'); ?></h3>
    <?php else: ?>
        <h3><?php echo lang('agent:title:edit_agent'); ?></h3>
    <?php endif; ?>

    <?php $this->view('admin/agents/partials/message'); ?>

    <div class="btn-toolbar">
        <a href="<?php echo site_url('admin/agents/create'); ?>" class="btn btn-primary"><i class="icon-plus"></i> <?php echo lang('agent:button:create_agent'); ?></a>
        <a href="<?php echo site_url('admin/agents'); ?>" class="btn btn-primary"><i class="icon-minus"></i> <?php echo lang('agent:button:manage_agents'); ?></a>
    </div>

    <div class="widget">
        <div class="widget-head">
            <?php if ($this->router->method == 'create'): ?>
                <h3 class="heading"><?php echo lang('agent:title:create_agent'); ?></h3>
            <?php else: ?>
                <h3 class="heading"><?php echo lang('agent:title:edit_agent'); ?></h3>
            <?php endif; ?>
        </div>

        <div class="widget-body">
            <?php echo form_open($this->uri->uri_string(), 'class="form-horizontal"'); ?>

            <div class="control-group">
                <label class="control-label" for="username"><?php echo lang('agent:label:username'); ?></label>
                <div class="controls">
                    <?php echo form_input('username', $agent->username, 'id="username"'); ?>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="email"><?php echo lang('agent:label:email'); ?></label>
                <div class="controls">
                    <?php echo form_input('email', $agent->email, 'id="email"'); ?>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="password"><?php echo lang('agent:label:password'); ?></label>
                <div class="controls">
                    <?php echo form_password('password', '', 'id="password"'); ?>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="password_confirm"><?php echo lang('agent:label:password_confirm'); ?></label>
                <div class="controls">
                    <?php echo form_password('password_confirm', '', 'id="password_confirm"'); ?>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="first_name"><?php echo lang('agent:label:first_name'); ?></label>
                <div class="controls">
                    <?php echo form_input('first_name', $agent->first_name, 'id="first_name"'); ?>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="last_name"><?php echo lang('agent:label:last_name'); ?></label>
                <div class="controls">
                    <?php echo form_input('last_name', $agent->last_name, 'id="last_name"'); ?>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="company"><?php echo lang('agent:label:company'); ?></label>
                <div class="controls">
                    <?php echo form_input('company', $agent->company, 'id="company"'); ?>
                </div>
            </div>

            <div class="control-group">
                <label class="control-label" for="phone"><?php echo lang('agent:label:phone'); ?></label>
                <div class="controls">
                    <?php echo form_input('phone', $agent->phone, 'id="phone" placeholder="123-4567890"'); ?>
                </div>
            </div>

            <div class="form-actions">
                <button type="submit" name="btnAction" value="save" class="btn btn-info"><i class="icon-ok"></i> <?php echo lang('global:save') ?></button>&nbsp;
                <button type="submit" name="btnAction" value="save_exit" class="btn btn-success"><i class="icon-ok"></i> <?php echo lang('global:save_exit') ?></button>&nbsp;
                <button class="btn" type="reset"><i class="icon-undo"></i> <?php echo lang('global:reset') ?></button>
            </div>
            <?php echo form_close(); ?>
        </div>
    </div> <!-- .widget -->

</div> <!-- .content -->

<?php echo $footer; ?>

